﻿using System.Collections;
using System.Collections.Generic;
using TBFramework;
using UnityEngine;

public static class StandardStaticMethod
{

    public static void DOFade1(this Transform target, float endValue, float duration)
    {
        StandardProperty.Instance.cameraStruct.mainCamera.transform.position = new Vector3(0, 0, 0);
    }
    
}
/// <summary>
/// 动态执行方法
/// </summary>
/// <typeparam name="T"></typeparam>
public class DynamicExecutor<T>
{
    public void Run(T data,string methodName,params object[] args)
    {
        data.GetType().GetMethod(methodName)?.Invoke(data, args);
        // var commonUtilsField = data.GetType().GetField("commonUtils");
        // if (commonUtilsField != null)
        // {
        //     var commonUtils = commonUtilsField.GetValue(data) as CommonUtils;

        //     if (commonUtils != null && commonUtils.movie != null)
        //     {
        //         commonUtils.movie.transform.position = new Vector3(500, 500, 0);
        //     }
        // }
    }
}